<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
	    xmlns:p="http://primefaces.org/ui"
		xmlns:c="http://java.sun.com/jsp/jstl/core">

	<ui:composition>
		
		<c:if test="${empty renderViewLink}">
			<c:set var="renderViewLink" value="true" />
		</c:if>
		<c:if test="${empty renderEditLink}">
			<c:set var="renderEditLink" value="true" />
		</c:if>
		<c:if test="${empty renderDeleteLink}">
			<c:set var="renderDeleteLink" value="true" />
		</c:if>
	
		<p:column style="width: 160px;" exportable="false">
             <f:facet name="header">
                    <h:outputText value="#{messages['commons.actions']}" />
             </f:facet>
             
             <p:tooltip for="viewlink" value="#{messages['commons.view']}" showEffect="slide" hideEffect="slide"/>
             <p:button id="viewlink" outcome="#{backingBean.getEditViewName()}" icon="ui-icon-search" rendered="#{renderViewLink}">
             	<f:param name="objectId" value="#{entity.id}"/>
             	<f:param name="edit" value="false"/>
             </p:button>
             <p:tooltip for="editlink" value="#{messages['commons.edit']}" showEffect="slide" hideEffect="slide"/>
             <p:button id="editlink" outcome="#{backingBean.getEditViewName()}" icon="ui-icon-document" rendered="#{renderEditLink}">
             	<f:param name="objectId" value="#{entity.id}"/>
             	<f:param name="edit" value="true"/>
             </p:button>
             <p:tooltip for="deletelink" value="#{messages['commons.delete']}" showEffect="slide" hideEffect="slide"/>
             <p:commandButton id="deletelink" action="#{backingBean.delete(entity.id)}" icon="ui-icon-trash" rendered="#{renderDeleteLink}" ajax="false" />
         </p:column>
	    
    </ui:composition>

</html>
